//
// Created by lenovo on 2024/1/11.
//

#ifndef CALCULATOR_FUNCTION_H
#define CALCULATOR_FUNCTION_H

#include "../Evaluable.h"
#include "../../const/const.h"
#include <utility>
#include <vector>
#include <string>

class Funcs : public Evaluable{
protected:
public:
    std::map<
            std::string ,
            Functions::iFunction*>
        *_identified_funcs;
    std::vector<Evaluable*> _argv ;
    std::string FuncType ;
public :
    Funcs() = default ;
    explicit Funcs(
            std::string type ,
            std::map<std::string ,Functions::iFunction*> *map
                    )
            : FuncType(std::move(type)) , _identified_funcs(map)
            {}
    double getValue() override;
};

extern std::vector<double> convert( const std::vector<Evaluable*>& _argv );

#endif //CALCULATOR_FUNCTION_H
